package com.isunland.managesystem.adapter;

import android.view.View;
import android.widget.TextView;
import com.isunland.managesystem.R;
import com.isunland.managesystem.base.BaseVolleyActivity;
import com.isunland.managesystem.entity.LocaleWorkCropInfoSub;
import com.isunland.managesystem.utils.MyStringUtil;
import java.util.ArrayList;

/**
 * 对象功能:
 * 开发公司: 北京信普达系统工程有限公司
 * 开发人员: wangyanan
 * 创建时间: 2017/4/14 14:41
 */
public class LocaleWorkCropInfoSubAdapter
    extends SimpleButterKnifeAdapterAdapter<LocaleWorkCropInfoSub> {
  public LocaleWorkCropInfoSubAdapter(BaseVolleyActivity context,
      ArrayList<LocaleWorkCropInfoSub> objects) {
    super(context, objects);
  }

  @Override protected void setText1(TextView tvOne, LocaleWorkCropInfoSub item) {
    tvOne.setText(MyStringUtil.connect(context.getString(R.string.cropInfoTypeName1),
        context.getString(R.string.colon), item.getCropInfoTypeName()));
  }

  @Override protected void setText2(TextView tvTwo, LocaleWorkCropInfoSub item) {
    tvTwo.setText(MyStringUtil.connect(context.getString(R.string.cropInfoNum1),
        context.getString(R.string.colon), MyStringUtil.valueOf(item.getCropInfoNum())));
  }

  @Override protected void setText3(TextView tvThree, LocaleWorkCropInfoSub item) {
    super.setText3(tvThree, item);
    tvThree.setVisibility(View.VISIBLE);
    tvThree.setText(item.getCheckInfo());
  }
}
